Previously HOSTCC was always hardcoded to gcc
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
SHELL ?= /bin/sh
# Tools to run on system hosting the build
-HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCFLAGS += -fno-strict-aliasing
clang ?= n
ifeq ($(clang),n)
gcc := y
+HOSTCC ?= gcc
else
gcc := n
+HOSTCC ?= clang
endif